package cn.school.system.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.school.system.mapper.BiCommissionMapper;
import cn.school.system.domain.BiCommission;
import cn.school.system.service.IBiCommissionService;

/**
 * 佣金明细信息Service业务层处理
 *
 * @author asheng
 * @date 2023-12-25
 */
@Service
public class BiCommissionServiceImpl implements IBiCommissionService
{
    @Autowired
    private BiCommissionMapper biCommissionMapper;

    /**
     * 查询佣金明细信息
     *
     * @param id 佣金明细信息主键
     * @return 佣金明细信息
     */
    @Override
    public BiCommission selectBiCommissionById(Long id)
    {
        return biCommissionMapper.selectBiCommissionById(id);
    }

    /**
     * 查询佣金明细信息列表
     *
     * @param biCommission 佣金明细信息
     * @return 佣金明细信息
     */
    @Override
    public List<BiCommission> selectBiCommissionList(BiCommission biCommission)
    {
        return biCommissionMapper.selectBiCommissionList(biCommission);
    }

    /**
     * 新增佣金明细信息
     *
     * @param biCommission 佣金明细信息
     * @return 结果
     */
    @Override
    public int insertBiCommission(BiCommission biCommission)
    {
        biCommission.setCreateTime(new Date());
        return biCommissionMapper.insertBiCommission(biCommission);
    }

    /**
     * 修改佣金明细信息
     *
     * @param biCommission 佣金明细信息
     * @return 结果
     */
    @Override
    public int updateBiCommission(BiCommission biCommission)
    {
        return biCommissionMapper.updateBiCommission(biCommission);
    }

    /**
     * 批量删除佣金明细信息
     *
     * @param ids 需要删除的佣金明细信息主键
     * @return 结果
     */
    @Override
    public int deleteBiCommissionByIds(Long[] ids)
    {
        return biCommissionMapper.deleteBiCommissionByIds(ids);
    }

    /**
     * 删除佣金明细信息信息
     *
     * @param id 佣金明细信息主键
     * @return 结果
     */
    @Override
    public int deleteBiCommissionById(Long id)
    {
        return biCommissionMapper.deleteBiCommissionById(id);
    }
}
